<template>
  <div>
	  <div v-if="optval==1">
		  <GoodList :goodId="1" />
	  </div>
	  <div v-else-if="optval==2">
		  <GoodList :goodId="2" />
	  </div>
	  <div v-else-if="optval==3">
		  <GoodList :goodId="3" />
	  </div>
	  <div v-else>
		  <GoodList :goodId="0" />
	  </div>
  </div>
</template>

<script type="text/javascript">
import Msg from './BusLineMsg.js'
import GoodList from './goodsList.vue'
export default {
	data(){
		return {
			optval: 0
		}
	},
	mounted:function() {
		var _this=this
		Msg.$on('opt', function(idx){
			_this.optval = idx;
		})
	},
	components:{
		GoodList
	}
}
</script>

<style>

</style>